<form action="news.manage.php" id="form_add" name="form_add" method="post">
	<input type="hidden" name="action" value="save_class" />
<table border="0" cellpadding="0" cellspacing="0" class="from_table">
	<tr>
		<th><tpl> $langSysNName </tpl></th>
	  <td width="480" class="td rowform"><input name="txttitle" type="text" id="txttitle" maxlength="50" class="txtinput"/></td>
		<td class="vtop tips2"><label style="display:none" for="txttitle" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>

</table>
<div class="table-5-bottom">
<div class="table-button">
		<span class="btn_left">
			<input type="submit" class="btn_submit" name="Submit" value="<tpl> $langSysNSubmit </tpl>" />
		  </span>
			<span class="btn_left">
	  <input type="button" class="btn_submit" name="return_list" id="return_list" value="<tpl> $langSysNReturn </tpl>" /></span>		</div>
	  </div>
</form>

<script>
$(document).ready(function() {
	//添加
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
							if(msg.type == '1'){
								ST(2,2);
								ShowDiv	= 'result_content';
								getPageContent("news.manage.php?action=ajax_class_list");
							}
						},
		type:      'post',
		dataType:  'json'
	};
	
	//对添加表单做的验证定义
	$("#form_add").validate({
		errorClass: "wrong",
		rules: {
			txttitle: {required: true}
		},
		messages: {
			txttitle: {required: "<tpl> $errSysNClassIsEmpty </tpl>"}
		},
		submitHandler: function() {
			$('#form_add').ajaxSubmit(options);
		}
	});
	
	$("#return_list").click(function(){
		ST(2,2);
		ShowDiv	= 'result_content';
		getPageContent("news.manage.php?action=ajax_class_list");
	});
});
</script>